package com.chengyu.core.service.services;

import com.chengyu.core.domain.result.ServicesCateResult;
import com.chengyu.core.exception.ServiceException;
import com.chengyu.core.model.PmsServicesCate;

import java.util.List;

/**
 * @title  商品商品分类
 * @author wenlj
 * @date   2022/4/25
 */
public interface ServicesCateService {

	/**
	 * 添加商品分类
	 * @author wenlj
	 * @date   2023/10/03
	 * @param  pid
	 * @param  name
	 * @param  sort
	 * @param  img
	 * @param  target
	 */
	Integer addServicesCate(Integer pid, String name, Integer sort, String img, String target);

	/**
	 * 更新商品分类
	 * @author wenlj
	 * @date   2022/4/25
	 * @param  cate
	 */
	void updateServicesCate(PmsServicesCate cate);

	/**
	 * 删除商品分类
	 * @author wenlj
	 * @date   2022/4/25
	 * @param  id
	 */
	void deleteServicesCate(Integer id) throws ServiceException;

	/**
	 * 获取商品分类
	 * @author wenlj
	 * @date   2022/4/25
	 * @return List<ServicesCateResult>
	 */
	List<ServicesCateResult> getServicesCateResults(Integer status);

	/**
	 * 获取商品分类名称
	 * @author wenlj
	 * @date   2022/5/14
	 * @param  cateIdList
	 * @return String
	 */
	String getServicesCateName(List<Integer> cateIdList);

	/**
	 * 根据上级分类查询下级分类
	 * @author wenlj
	 * @date   2022/5/14
	 * @param  pid
	 * @return List<PmsServicesCate>
	 */
	List<PmsServicesCate> getListByPid(Integer pid);
}